<template>
    <div class="demo-date-picker">
        <div class="block">
            <el-config-provider :locale="zhCn">
                <el-date-picker v-model="value1" type="monthrange" range-separator="~" start-placeholder="开始时间"
                    end-placeholder="结束时间" :size="size" @change="change"   value-format="YYYY-MM " format="YYYY-MM" 
                   />
            </el-config-provider>
        </div>
    </div>
</template>
<script lang="ts" setup>
import { onMounted, ref ,defineEmits} from 'vue'
import { defineComponent } from 'vue'
import { ElConfigProvider } from 'element-plus'

import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
const size = ref<'default' | 'large' | 'small'>('default')
function change(val){
    emit("time_change",val)
}

const emit = defineEmits(["time_change"])
const value1 = ref('')
const value2 = ref('')
</script>
  
<style scoped>

:deep(.el-date-editor){
    width: 100%;
    height: 32px;
}
</style>
  